package com.ruoyi.tb.lmt.mapper;

import com.ruoyi.tb.lmt.domain.TbMessageNotice;
import com.ruoyi.tb.lmt.domain.vo.MessageCountVo;
import com.ruoyi.tb.lmt.domain.vo.TbMessageNoticeVo;
import com.ruoyi.common.core.mapper.BaseMapperPlus;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;

/**
 * 消息通知Mapper接口
 *
 * @author ruoyi
 * @date 2024-01-18
 */
@Mapper
public interface TbMessageNoticeMapper extends BaseMapperPlus<TbMessageNoticeMapper, TbMessageNotice, TbMessageNoticeVo> {

    List<TbMessageNoticeVo> selectMessage(@Param("username")String username,@Param("messageType")String messageType, @Param("workGroup") String workGroup, @Param("status") String status, @Param("startTime") Date startTime, @Param("endTime") Date endTime);

    TbMessageNoticeVo selectMeById(@Param("messageId") Long messageId);

    MessageCountVo selectAcceptCount(@Param("username")String username);

    String selectDeputyDirector(Long workGroupId);

    String selectEquipmentDepartment();

    String selectAcceptanceRoom();

    String selectCaptain(Long workGroupId);

    String selectInspection();

    List<TbMessageNoticeVo> selectMessageByInspection(@Param("username")String username,@Param("messageType")String messageType, @Param("workGroup") String workGroup, @Param("status") String status, @Param("startTime") Date startTime, @Param("endTime") Date endTime);

    List<TbMessageNoticeVo> selectMessageByEquipmentDept(@Param("username")String username,@Param("messageType")String messageType, @Param("workGroup") String workGroup, @Param("status") String status, @Param("startTime") Date startTime, @Param("endTime") Date endTime);

    List<TbMessageNoticeVo> selectMessageByAcceptanceRoom(@Param("username")String username,@Param("messageType")String messageType, @Param("workGroup") String workGroup, @Param("status") String status, @Param("startTime") Date startTime, @Param("endTime") Date endTime);

    List<TbMessageNoticeVo> selectMessageByDeputyDirector(@Param("username")String username,@Param("messageType")String messageType, @Param("workGroup") String workGroup, @Param("status") String status, @Param("startTime") Date startTime, @Param("endTime") Date endTime);

    List<TbMessageNoticeVo> selectMessageByAdmin(@Param("username")String username,@Param("messageType")String messageType, @Param("workGroup") String workGroup, @Param("status") String status, @Param("startTime") Date startTime, @Param("endTime") Date endTime);

    MessageCountVo selectAcceptCountByadmin();

    MessageCountVo selectAcceptCountByDeputyDirector(@Param("username")String username);

    MessageCountVo selectAcceptCountByAcceptanceRoom(@Param("username")String username);

    MessageCountVo selectAcceptCountByEquipmentDepartment(@Param("username")String username);

    MessageCountVo selectAcceptCountByInspection(@Param("username")String username);
}
